package top.zhaoyuliu.logbook.client.connect.client;

import org.tio.client.intf.ClientAioListener;
import org.tio.core.ChannelContext;
import org.tio.core.intf.Packet;

import lombok.extern.slf4j.Slf4j;

/**
 * 
 * Copyright © 2021 Arain. All rights reserved.
 *
 * @Title: BlockClientAioListener.java
 * @Prject: logbook-client
 * @Package: top.zhaoyuliu.logbook.client.connect.client
 * @Description: <功能详细描述>
 * @author: Arain  
 * @date: 2021年1月22日 下午3:24:12
 * @version: V1.0
 */
@Slf4j
public class LbClientAioListener implements ClientAioListener {

    @Override
    public void onAfterConnected(ChannelContext channelContext, boolean isConnected, boolean isReconnect) throws Exception {
    	
    }

    @Override
    public void onBeforeClose(ChannelContext channelContext, Throwable throwable, String s, boolean b) {
        log.info("连接关闭：server地址为-" + channelContext.getServerNode());
    }

    @Override
    public void onAfterDecoded(ChannelContext channelContext, Packet packet, int i) throws Exception {

    }

    @Override
    public void onAfterReceivedBytes(ChannelContext channelContext, int i) throws Exception {

    }

    @Override
    public void onAfterSent(ChannelContext channelContext, Packet packet, boolean b) throws Exception {

    }

    @Override
    public void onAfterHandled(ChannelContext channelContext, Packet packet, long l) throws Exception {

    }

}
